{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Ames房价预测"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.数据探索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Id</th>\n",
       "      <th>MSSubClass</th>\n",
       "      <th>MSZoning</th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>Street</th>\n",
       "      <th>Alley</th>\n",
       "      <th>LotShape</th>\n",
       "      <th>LandContour</th>\n",
       "      <th>Utilities</th>\n",
       "      <th>...</th>\n",
       "      <th>PoolArea</th>\n",
       "      <th>PoolQC</th>\n",
       "      <th>Fence</th>\n",
       "      <th>MiscFeature</th>\n",
       "      <th>MiscVal</th>\n",
       "      <th>MoSold</th>\n",
       "      <th>YrSold</th>\n",
       "      <th>SaleType</th>\n",
       "      <th>SaleCondition</th>\n",
       "      <th>SalePrice</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>65.0</td>\n",
       "      <td>8450</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>208500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>20</td>\n",
       "      <td>RL</td>\n",
       "      <td>80.0</td>\n",
       "      <td>9600</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>2007</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>181500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>68.0</td>\n",
       "      <td>11250</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>223500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>70</td>\n",
       "      <td>RL</td>\n",
       "      <td>60.0</td>\n",
       "      <td>9550</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2006</td>\n",
       "      <td>WD</td>\n",
       "      <td>Abnorml</td>\n",
       "      <td>140000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>84.0</td>\n",
       "      <td>14260</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>250000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 81 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Id  MSSubClass MSZoning  LotFrontage  LotArea Street Alley LotShape  \\\n",
       "0   1          60       RL         65.0     8450   Pave   NaN      Reg   \n",
       "1   2          20       RL         80.0     9600   Pave   NaN      Reg   \n",
       "2   3          60       RL         68.0    11250   Pave   NaN      IR1   \n",
       "3   4          70       RL         60.0     9550   Pave   NaN      IR1   \n",
       "4   5          60       RL         84.0    14260   Pave   NaN      IR1   \n",
       "\n",
       "  LandContour Utilities    ...     PoolArea PoolQC Fence MiscFeature MiscVal  \\\n",
       "0         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "1         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "2         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "3         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "4         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "\n",
       "  MoSold YrSold  SaleType  SaleCondition  SalePrice  \n",
       "0      2   2008        WD         Normal     208500  \n",
       "1      5   2007        WD         Normal     181500  \n",
       "2      9   2008        WD         Normal     223500  \n",
       "3      2   2006        WD        Abnorml     140000  \n",
       "4     12   2008        WD         Normal     250000  \n",
       "\n",
       "[5 rows x 81 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "%matplotlib inline\n",
    "dpath = './data/'\n",
    "data = pd.read_csv(dpath+'Ames_House_train.csv')\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1460 entries, 0 to 1459\n",
      "Data columns (total 81 columns):\n",
      "Id               1460 non-null int64\n",
      "MSSubClass       1460 non-null int64\n",
      "MSZoning         1460 non-null object\n",
      "LotFrontage      1201 non-null float64\n",
      "LotArea          1460 non-null int64\n",
      "Street           1460 non-null object\n",
      "Alley            91 non-null object\n",
      "LotShape         1460 non-null object\n",
      "LandContour      1460 non-null object\n",
      "Utilities        1460 non-null object\n",
      "LotConfig        1460 non-null object\n",
      "LandSlope        1460 non-null object\n",
      "Neighborhood     1460 non-null object\n",
      "Condition1       1460 non-null object\n",
      "Condition2       1460 non-null object\n",
      "BldgType         1460 non-null object\n",
      "HouseStyle       1460 non-null object\n",
      "OverallQual      1460 non-null int64\n",
      "OverallCond      1460 non-null int64\n",
      "YearBuilt        1460 non-null int64\n",
      "YearRemodAdd     1460 non-null int64\n",
      "RoofStyle        1460 non-null object\n",
      "RoofMatl         1460 non-null object\n",
      "Exterior1st      1460 non-null object\n",
      "Exterior2nd      1460 non-null object\n",
      "MasVnrType       1452 non-null object\n",
      "MasVnrArea       1452 non-null float64\n",
      "ExterQual        1460 non-null object\n",
      "ExterCond        1460 non-null object\n",
      "Foundation       1460 non-null object\n",
      "BsmtQual         1423 non-null object\n",
      "BsmtCond         1423 non-null object\n",
      "BsmtExposure     1422 non-null object\n",
      "BsmtFinType1     1423 non-null object\n",
      "BsmtFinSF1       1460 non-null int64\n",
      "BsmtFinType2     1422 non-null object\n",
      "BsmtFinSF2       1460 non-null int64\n",
      "BsmtUnfSF        1460 non-null int64\n",
      "TotalBsmtSF      1460 non-null int64\n",
      "Heating          1460 non-null object\n",
      "HeatingQC        1460 non-null object\n",
      "CentralAir       1460 non-null object\n",
      "Electrical       1459 non-null object\n",
      "1stFlrSF         1460 non-null int64\n",
      "2ndFlrSF         1460 non-null int64\n",
      "LowQualFinSF     1460 non-null int64\n",
      "GrLivArea        1460 non-null int64\n",
      "BsmtFullBath     1460 non-null int64\n",
      "BsmtHalfBath     1460 non-null int64\n",
      "FullBath         1460 non-null int64\n",
      "HalfBath         1460 non-null int64\n",
      "BedroomAbvGr     1460 non-null int64\n",
      "KitchenAbvGr     1460 non-null int64\n",
      "KitchenQual      1460 non-null object\n",
      "TotRmsAbvGrd     1460 non-null int64\n",
      "Functional       1460 non-null object\n",
      "Fireplaces       1460 non-null int64\n",
      "FireplaceQu      770 non-null object\n",
      "GarageType       1379 non-null object\n",
      "GarageYrBlt      1379 non-null float64\n",
      "GarageFinish     1379 non-null object\n",
      "GarageCars       1460 non-null int64\n",
      "GarageArea       1460 non-null int64\n",
      "GarageQual       1379 non-null object\n",
      "GarageCond       1379 non-null object\n",
      "PavedDrive       1460 non-null object\n",
      "WoodDeckSF       1460 non-null int64\n",
      "OpenPorchSF      1460 non-null int64\n",
      "EnclosedPorch    1460 non-null int64\n",
      "3SsnPorch        1460 non-null int64\n",
      "ScreenPorch      1460 non-null int64\n",
      "PoolArea         1460 non-null int64\n",
      "PoolQC           7 non-null object\n",
      "Fence            281 non-null object\n",
      "MiscFeature      54 non-null object\n",
      "MiscVal          1460 non-null int64\n",
      "MoSold           1460 non-null int64\n",
      "YrSold           1460 non-null int64\n",
      "SaleType         1460 non-null object\n",
      "SaleCondition    1460 non-null object\n",
      "SalePrice        1460 non-null int64\n",
      "dtypes: float64(3), int64(35), object(43)\n",
      "memory usage: 924.0+ KB\n"
     ]
    }
   ],
   "source": [
    "data.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Id                  0\n",
       "MSSubClass          0\n",
       "MSZoning            0\n",
       "LotFrontage       259\n",
       "LotArea             0\n",
       "Street              0\n",
       "Alley            1369\n",
       "LotShape            0\n",
       "LandContour         0\n",
       "Utilities           0\n",
       "LotConfig           0\n",
       "LandSlope           0\n",
       "Neighborhood        0\n",
       "Condition1          0\n",
       "Condition2          0\n",
       "BldgType            0\n",
       "HouseStyle          0\n",
       "OverallQual         0\n",
       "OverallCond         0\n",
       "YearBuilt           0\n",
       "YearRemodAdd        0\n",
       "RoofStyle           0\n",
       "RoofMatl            0\n",
       "Exterior1st         0\n",
       "Exterior2nd         0\n",
       "MasVnrType          8\n",
       "MasVnrArea          8\n",
       "ExterQual           0\n",
       "ExterCond           0\n",
       "Foundation          0\n",
       "                 ... \n",
       "BedroomAbvGr        0\n",
       "KitchenAbvGr        0\n",
       "KitchenQual         0\n",
       "TotRmsAbvGrd        0\n",
       "Functional          0\n",
       "Fireplaces          0\n",
       "FireplaceQu       690\n",
       "GarageType         81\n",
       "GarageYrBlt        81\n",
       "GarageFinish       81\n",
       "GarageCars          0\n",
       "GarageArea          0\n",
       "GarageQual         81\n",
       "GarageCond         81\n",
       "PavedDrive          0\n",
       "WoodDeckSF          0\n",
       "OpenPorchSF         0\n",
       "EnclosedPorch       0\n",
       "3SsnPorch           0\n",
       "ScreenPorch         0\n",
       "PoolArea            0\n",
       "PoolQC           1453\n",
       "Fence            1179\n",
       "MiscFeature      1406\n",
       "MiscVal             0\n",
       "MoSold              0\n",
       "YrSold              0\n",
       "SaleType            0\n",
       "SaleCondition       0\n",
       "SalePrice           0\n",
       "Length: 81, dtype: int64"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1460 entries, 0 to 1459\n",
      "Data columns (total 76 columns):\n",
      "MSSubClass       1460 non-null int64\n",
      "MSZoning         1460 non-null object\n",
      "LotFrontage      1201 non-null float64\n",
      "LotArea          1460 non-null int64\n",
      "Street           1460 non-null object\n",
      "LotShape         1460 non-null object\n",
      "LandContour      1460 non-null object\n",
      "Utilities        1460 non-null object\n",
      "LotConfig        1460 non-null object\n",
      "LandSlope        1460 non-null object\n",
      "Neighborhood     1460 non-null object\n",
      "Condition1       1460 non-null object\n",
      "Condition2       1460 non-null object\n",
      "BldgType         1460 non-null object\n",
      "HouseStyle       1460 non-null object\n",
      "OverallQual      1460 non-null int64\n",
      "OverallCond      1460 non-null int64\n",
      "YearBuilt        1460 non-null int64\n",
      "YearRemodAdd     1460 non-null int64\n",
      "RoofStyle        1460 non-null object\n",
      "RoofMatl         1460 non-null object\n",
      "Exterior1st      1460 non-null object\n",
      "Exterior2nd      1460 non-null object\n",
      "MasVnrType       1452 non-null object\n",
      "MasVnrArea       1452 non-null float64\n",
      "ExterQual        1460 non-null object\n",
      "ExterCond        1460 non-null object\n",
      "Foundation       1460 non-null object\n",
      "BsmtQual         1423 non-null object\n",
      "BsmtCond         1423 non-null object\n",
      "BsmtExposure     1422 non-null object\n",
      "BsmtFinType1     1423 non-null object\n",
      "BsmtFinSF1       1460 non-null int64\n",
      "BsmtFinType2     1422 non-null object\n",
      "BsmtFinSF2       1460 non-null int64\n",
      "BsmtUnfSF        1460 non-null int64\n",
      "TotalBsmtSF      1460 non-null int64\n",
      "Heating          1460 non-null object\n",
      "HeatingQC        1460 non-null object\n",
      "CentralAir       1460 non-null object\n",
      "Electrical       1459 non-null object\n",
      "1stFlrSF         1460 non-null int64\n",
      "2ndFlrSF         1460 non-null int64\n",
      "LowQualFinSF     1460 non-null int64\n",
      "GrLivArea        1460 non-null int64\n",
      "BsmtFullBath     1460 non-null int64\n",
      "BsmtHalfBath     1460 non-null int64\n",
      "FullBath         1460 non-null int64\n",
      "HalfBath         1460 non-null int64\n",
      "BedroomAbvGr     1460 non-null int64\n",
      "KitchenAbvGr     1460 non-null int64\n",
      "KitchenQual      1460 non-null object\n",
      "TotRmsAbvGrd     1460 non-null int64\n",
      "Functional       1460 non-null object\n",
      "Fireplaces       1460 non-null int64\n",
      "FireplaceQu      770 non-null object\n",
      "GarageType       1379 non-null object\n",
      "GarageYrBlt      1379 non-null float64\n",
      "GarageFinish     1379 non-null object\n",
      "GarageCars       1460 non-null int64\n",
      "GarageArea       1460 non-null int64\n",
      "GarageQual       1379 non-null object\n",
      "GarageCond       1379 non-null object\n",
      "PavedDrive       1460 non-null object\n",
      "WoodDeckSF       1460 non-null int64\n",
      "OpenPorchSF      1460 non-null int64\n",
      "EnclosedPorch    1460 non-null int64\n",
      "3SsnPorch        1460 non-null int64\n",
      "ScreenPorch      1460 non-null int64\n",
      "PoolArea         1460 non-null int64\n",
      "MiscVal          1460 non-null int64\n",
      "MoSold           1460 non-null int64\n",
      "YrSold           1460 non-null int64\n",
      "SaleType         1460 non-null object\n",
      "SaleCondition    1460 non-null object\n",
      "SalePrice        1460 non-null int64\n",
      "dtypes: float64(3), int64(34), object(39)\n",
      "memory usage: 866.9+ KB\n"
     ]
    }
   ],
   "source": [
    "data = data.drop([\"Id\",\"Alley\",\"PoolQC\",\"Fence\",\"MiscFeature\"],axis = 1)\n",
    "data.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>MSSubClass</th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>OverallQual</th>\n",
       "      <th>OverallCond</th>\n",
       "      <th>YearBuilt</th>\n",
       "      <th>YearRemodAdd</th>\n",
       "      <th>MasVnrArea</th>\n",
       "      <th>BsmtFinSF1</th>\n",
       "      <th>BsmtFinSF2</th>\n",
       "      <th>...</th>\n",
       "      <th>WoodDeckSF</th>\n",
       "      <th>OpenPorchSF</th>\n",
       "      <th>EnclosedPorch</th>\n",
       "      <th>3SsnPorch</th>\n",
       "      <th>ScreenPorch</th>\n",
       "      <th>PoolArea</th>\n",
       "      <th>MiscVal</th>\n",
       "      <th>MoSold</th>\n",
       "      <th>YrSold</th>\n",
       "      <th>SalePrice</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1201.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1452.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "      <td>1460.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>56.897260</td>\n",
       "      <td>70.049958</td>\n",
       "      <td>10516.828082</td>\n",
       "      <td>6.099315</td>\n",
       "      <td>5.575342</td>\n",
       "      <td>1971.267808</td>\n",
       "      <td>1984.865753</td>\n",
       "      <td>103.685262</td>\n",
       "      <td>443.639726</td>\n",
       "      <td>46.549315</td>\n",
       "      <td>...</td>\n",
       "      <td>94.244521</td>\n",
       "      <td>46.660274</td>\n",
       "      <td>21.954110</td>\n",
       "      <td>3.409589</td>\n",
       "      <td>15.060959</td>\n",
       "      <td>2.758904</td>\n",
       "      <td>43.489041</td>\n",
       "      <td>6.321918</td>\n",
       "      <td>2007.815753</td>\n",
       "      <td>180921.195890</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>42.300571</td>\n",
       "      <td>24.284752</td>\n",
       "      <td>9981.264932</td>\n",
       "      <td>1.382997</td>\n",
       "      <td>1.112799</td>\n",
       "      <td>30.202904</td>\n",
       "      <td>20.645407</td>\n",
       "      <td>181.066207</td>\n",
       "      <td>456.098091</td>\n",
       "      <td>161.319273</td>\n",
       "      <td>...</td>\n",
       "      <td>125.338794</td>\n",
       "      <td>66.256028</td>\n",
       "      <td>61.119149</td>\n",
       "      <td>29.317331</td>\n",
       "      <td>55.757415</td>\n",
       "      <td>40.177307</td>\n",
       "      <td>496.123024</td>\n",
       "      <td>2.703626</td>\n",
       "      <td>1.328095</td>\n",
       "      <td>79442.502883</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>20.000000</td>\n",
       "      <td>21.000000</td>\n",
       "      <td>1300.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1872.000000</td>\n",
       "      <td>1950.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2006.000000</td>\n",
       "      <td>34900.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>20.000000</td>\n",
       "      <td>59.000000</td>\n",
       "      <td>7553.500000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>1954.000000</td>\n",
       "      <td>1967.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>2007.000000</td>\n",
       "      <td>129975.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>50.000000</td>\n",
       "      <td>69.000000</td>\n",
       "      <td>9478.500000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>1973.000000</td>\n",
       "      <td>1994.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>383.500000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>25.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>2008.000000</td>\n",
       "      <td>163000.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>70.000000</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>11601.500000</td>\n",
       "      <td>7.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>2000.000000</td>\n",
       "      <td>2004.000000</td>\n",
       "      <td>166.000000</td>\n",
       "      <td>712.250000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>168.000000</td>\n",
       "      <td>68.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>2009.000000</td>\n",
       "      <td>214000.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>190.000000</td>\n",
       "      <td>313.000000</td>\n",
       "      <td>215245.000000</td>\n",
       "      <td>10.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>2010.000000</td>\n",
       "      <td>2010.000000</td>\n",
       "      <td>1600.000000</td>\n",
       "      <td>5644.000000</td>\n",
       "      <td>1474.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>857.000000</td>\n",
       "      <td>547.000000</td>\n",
       "      <td>552.000000</td>\n",
       "      <td>508.000000</td>\n",
       "      <td>480.000000</td>\n",
       "      <td>738.000000</td>\n",
       "      <td>15500.000000</td>\n",
       "      <td>12.000000</td>\n",
       "      <td>2010.000000</td>\n",
       "      <td>755000.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8 rows × 37 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        MSSubClass  LotFrontage        LotArea  OverallQual  OverallCond  \\\n",
       "count  1460.000000  1201.000000    1460.000000  1460.000000  1460.000000   \n",
       "mean     56.897260    70.049958   10516.828082     6.099315     5.575342   \n",
       "std      42.300571    24.284752    9981.264932     1.382997     1.112799   \n",
       "min      20.000000    21.000000    1300.000000     1.000000     1.000000   \n",
       "25%      20.000000    59.000000    7553.500000     5.000000     5.000000   \n",
       "50%      50.000000    69.000000    9478.500000     6.000000     5.000000   \n",
       "75%      70.000000    80.000000   11601.500000     7.000000     6.000000   \n",
       "max     190.000000   313.000000  215245.000000    10.000000     9.000000   \n",
       "\n",
       "         YearBuilt  YearRemodAdd   MasVnrArea   BsmtFinSF1   BsmtFinSF2  \\\n",
       "count  1460.000000   1460.000000  1452.000000  1460.000000  1460.000000   \n",
       "mean   1971.267808   1984.865753   103.685262   443.639726    46.549315   \n",
       "std      30.202904     20.645407   181.066207   456.098091   161.319273   \n",
       "min    1872.000000   1950.000000     0.000000     0.000000     0.000000   \n",
       "25%    1954.000000   1967.000000     0.000000     0.000000     0.000000   \n",
       "50%    1973.000000   1994.000000     0.000000   383.500000     0.000000   \n",
       "75%    2000.000000   2004.000000   166.000000   712.250000     0.000000   \n",
       "max    2010.000000   2010.000000  1600.000000  5644.000000  1474.000000   \n",
       "\n",
       "           ...         WoodDeckSF  OpenPorchSF  EnclosedPorch    3SsnPorch  \\\n",
       "count      ...        1460.000000  1460.000000    1460.000000  1460.000000   \n",
       "mean       ...          94.244521    46.660274      21.954110     3.409589   \n",
       "std        ...         125.338794    66.256028      61.119149    29.317331   \n",
       "min        ...           0.000000     0.000000       0.000000     0.000000   \n",
       "25%        ...           0.000000     0.000000       0.000000     0.000000   \n",
       "50%        ...           0.000000    25.000000       0.000000     0.000000   \n",
       "75%        ...         168.000000    68.000000       0.000000     0.000000   \n",
       "max        ...         857.000000   547.000000     552.000000   508.000000   \n",
       "\n",
       "       ScreenPorch     PoolArea       MiscVal       MoSold       YrSold  \\\n",
       "count  1460.000000  1460.000000   1460.000000  1460.000000  1460.000000   \n",
       "mean     15.060959     2.758904     43.489041     6.321918  2007.815753   \n",
       "std      55.757415    40.177307    496.123024     2.703626     1.328095   \n",
       "min       0.000000     0.000000      0.000000     1.000000  2006.000000   \n",
       "25%       0.000000     0.000000      0.000000     5.000000  2007.000000   \n",
       "50%       0.000000     0.000000      0.000000     6.000000  2008.000000   \n",
       "75%       0.000000     0.000000      0.000000     8.000000  2009.000000   \n",
       "max     480.000000   738.000000  15500.000000    12.000000  2010.000000   \n",
       "\n",
       "           SalePrice  \n",
       "count    1460.000000  \n",
       "mean   180921.195890  \n",
       "std     79442.502883  \n",
       "min     34900.000000  \n",
       "25%    129975.000000  \n",
       "50%    163000.000000  \n",
       "75%    214000.000000  \n",
       "max    755000.000000  \n",
       "\n",
       "[8 rows x 37 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAENCAYAAAAsWUMWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XmYXMV56P/v292zaxbNaLSNdmlA\nSGDAHgtk8CYcEHliCyc4FsSE5HIfHF+4cWLnBoh/8bW5JonySywnP2NjYnD4YWNBcGxkGxvbLHbM\nMmhACLSi0T5aR7Nq9unu9/5xakSr1duMWtPb+3meeaa7Tp2q6tM9/U6dOqdKVBVjjDEmXXyZboAx\nxpj8YoHFGGNMWllgMcYYk1YWWIwxxqSVBRZjjDFpZYHFGGNMWllgMcYYk1YWWIwxxqSVBRZjjDFp\nFch0AzJh2rRpumDBgkw3wxhjcsprr712UlXrk+UryMCyYMECWlpaMt0MY4zJKSJyIJV8dirMGGNM\nWllgMcYYk1YWWIwxxqSVBRZjjDFpZYHFGGNMWllgMcYYk1YWWIwxxqSVBRZjjDFpZYHFGGNMWhXk\nnffmbI81Hzzj+c1XzMtQS4wxuc56LMYYY9LKAosxxpi0ssBijDEmrSywGGOMSSsLLMYYY9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CvnijS18a/w1gPZhDdGsw7wqeohvGVt/wZvjflD\neMHP/v7NeWHrsRhjjEkr+4/FGGNMWllgMcYYk1YWWIwxxqSVBRZjjDFpZYHFGGNMWllgMcYYk1YW\nWIwxxqSVBRZjjDFpZYHFGGNMWv1flnXF9nhRr/QAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xc8152e8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure()\n",
    "sns.distplot(data.SalePrice.values,bins = 60,kde = True)\n",
    "plt.xlabel('SalePrice', fontsize = 12)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "GarageCars and GarageArea = 0.88\n",
      "YearBuilt and GarageYrBlt = 0.83\n",
      "GrLivArea and TotRmsAbvGrd = 0.83\n",
      "TotalBsmtSF and 1stFlrSF = 0.82\n",
      "OverallQual and SalePrice = 0.79\n",
      "GrLivArea and SalePrice = 0.71\n",
      "2ndFlrSF and GrLivArea = 0.69\n",
      "BedroomAbvGr and TotRmsAbvGrd = 0.68\n",
      "BsmtFinSF1 and BsmtFullBath = 0.65\n",
      "YearRemodAdd and GarageYrBlt = 0.64\n",
      "GarageCars and SalePrice = 0.64\n",
      "GrLivArea and FullBath = 0.63\n",
      "GarageArea and SalePrice = 0.62\n",
      "2ndFlrSF and TotRmsAbvGrd = 0.62\n",
      "TotalBsmtSF and SalePrice = 0.61\n",
      "2ndFlrSF and HalfBath = 0.61\n",
      "1stFlrSF and SalePrice = 0.61\n",
      "OverallQual and GarageCars = 0.60\n",
      "OverallQual and GrLivArea = 0.59\n",
      "YearBuilt and YearRemodAdd = 0.59\n",
      "GarageYrBlt and GarageCars = 0.59\n",
      "OverallQual and YearBuilt = 0.57\n",
      "1stFlrSF and GrLivArea = 0.57\n",
      "GarageYrBlt and GarageArea = 0.56\n",
      "OverallQual and GarageArea = 0.56\n",
      "FullBath and SalePrice = 0.56\n",
      "FullBath and TotRmsAbvGrd = 0.55\n",
      "OverallQual and YearRemodAdd = 0.55\n",
      "OverallQual and FullBath = 0.55\n",
      "OverallQual and GarageYrBlt = 0.55\n",
      "YearBuilt and GarageCars = 0.54\n",
      "OverallQual and TotalBsmtSF = 0.54\n",
      "TotRmsAbvGrd and SalePrice = 0.53\n",
      "YearBuilt and SalePrice = 0.52\n",
      "BsmtFinSF1 and TotalBsmtSF = 0.52\n",
      "GrLivArea and BedroomAbvGr = 0.52\n",
      "YearRemodAdd and SalePrice = 0.51\n",
      "2ndFlrSF and BedroomAbvGr = 0.50\n"
     ]
    }
   ],
   "source": [
    "data_corr = data.corr().abs()\n",
    "threshold = 0.5\n",
    "corr_list = []\n",
    "cols = data_corr.columns\n",
    "size = data_corr.shape[1]\n",
    "for i in range(0, size):\n",
    "    for j in range(i+1,size):\n",
    "        if (data_corr.iloc[i,j] >= threshold and data_corr.iloc[i,j] < 1) or (data_corr.iloc[i,j] < 0 and data_corr.iloc[i,j] <= -threshold):\n",
    "           corr_list.append([data_corr.iloc[i,j],i,j])\n",
    "s_corr_list = sorted(corr_list,key=lambda x: -abs(x[0]))\n",
    "for v,i,j in s_corr_list:\n",
    "    print (\"%s and %s = %.2f\" % (cols[i],cols[j],v))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Categorical features : 43\n",
      "NAs for categorical features in data : 6617\n",
      "Remaining NAs for categorical features in df : 6617\n",
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1460 entries, 0 to 1459\n",
      "Columns: 333 entries, Id to SaleCondition_nan\n",
      "dtypes: float64(3), int64(35), uint8(295)\n",
      "memory usage: 854.1 KB\n"
     ]
    }
   ],
   "source": [
    "categorical_features = data.select_dtypes(include = [\"object\"]).columns\n",
    "print(\"Categorical features : \" + str(len(categorical_features)))\n",
    "df_cat = data[categorical_features]\n",
    "print(\"NAs for categorical features in data : \" + str(df_cat.isnull().values.sum()))\n",
    "dummies = pd.get_dummies(df_cat,dummy_na = True)\n",
    "print(\"Remaining NAs for categorical features in df : \" + str(df_cat.isnull().values.sum()))\n",
    "data = data.drop(df_cat,axis = 1)\n",
    "data = pd.concat([data,dummies],axis = 1)\n",
    "data.info()\n",
    "data.to_csv('fe_Ames.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y = data['SalePrice'].values\n",
    "X = data.drop('SalePrice',axis = 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "#将数据分割训练数据与测试数据\n",
    "from sklearn.cross_validation import train_test_split\n",
    "\n",
    "# 随机采样25%的数据构建测试样本，其余作为训练样本\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=33, test_size=0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "ename": "ValueError",
     "evalue": "Input contains NaN, infinity or a value too large for dtype('float64').",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-18-228c5638b4c7>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      7\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      8\u001b[0m \u001b[1;31m# 分别对训练和测试数据的特征以及目标值进行标准化处理\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 9\u001b[1;33m \u001b[0mX_train\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mss_X\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfit_transform\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX_train\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     10\u001b[0m \u001b[0mX_test\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mss_X\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtransform\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX_test\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     11\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\Soft\\AI_Tools\\Anaconda2\\lib\\site-packages\\sklearn\\base.pyc\u001b[0m in \u001b[0;36mfit_transform\u001b[1;34m(self, X, y, **fit_params)\u001b[0m\n\u001b[0;32m    515\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0my\u001b[0m \u001b[1;32mis\u001b[0m \u001b[0mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    516\u001b[0m             \u001b[1;31m# fit method of arity 1 (unsupervised transformation)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 517\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mfit_params\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtransform\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    518\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    519\u001b[0m             \u001b[1;31m# fit method of arity 2 (supervised transformation)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\Soft\\AI_Tools\\Anaconda2\\lib\\site-packages\\sklearn\\preprocessing\\data.pyc\u001b[0m in \u001b[0;36mfit\u001b[1;34m(self, X, y)\u001b[0m\n\u001b[0;32m    588\u001b[0m         \u001b[1;31m# Reset internal state before fitting\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    589\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_reset\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 590\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpartial_fit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0my\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    591\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    592\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mpartial_fit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mX\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0my\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mNone\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\Soft\\AI_Tools\\Anaconda2\\lib\\site-packages\\sklearn\\preprocessing\\data.pyc\u001b[0m in \u001b[0;36mpartial_fit\u001b[1;34m(self, X, y)\u001b[0m\n\u001b[0;32m    610\u001b[0m         \"\"\"\n\u001b[0;32m    611\u001b[0m         X = check_array(X, accept_sparse=('csr', 'csc'), copy=self.copy,\n\u001b[1;32m--> 612\u001b[1;33m                         warn_on_dtype=True, estimator=self, dtype=FLOAT_DTYPES)\n\u001b[0m\u001b[0;32m    613\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    614\u001b[0m         \u001b[1;31m# Even in the case of `with_mean=False`, we update the mean anyway\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\Soft\\AI_Tools\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\validation.pyc\u001b[0m in \u001b[0;36mcheck_array\u001b[1;34m(array, accept_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, warn_on_dtype, estimator)\u001b[0m\n\u001b[0;32m    451\u001b[0m                              % (array.ndim, estimator_name))\n\u001b[0;32m    452\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mforce_all_finite\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 453\u001b[1;33m             \u001b[0m_assert_all_finite\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0marray\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    454\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    455\u001b[0m     \u001b[0mshape_repr\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0m_shape_repr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0marray\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\Soft\\AI_Tools\\Anaconda2\\lib\\site-packages\\sklearn\\utils\\validation.pyc\u001b[0m in \u001b[0;36m_assert_all_finite\u001b[1;34m(X)\u001b[0m\n\u001b[0;32m     42\u001b[0m             and not np.isfinite(X).all()):\n\u001b[0;32m     43\u001b[0m         raise ValueError(\"Input contains NaN, infinity\"\n\u001b[1;32m---> 44\u001b[1;33m                          \" or a value too large for %r.\" % X.dtype)\n\u001b[0m\u001b[0;32m     45\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     46\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mValueError\u001b[0m: Input contains NaN, infinity or a value too large for dtype('float64')."
     ]
    }
   ],
   "source": [
    "# 数据标准化\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "\n",
    "# 分别初始化对特征和目标值的标准化器\n",
    "ss_X = StandardScaler()\n",
    "ss_y = StandardScaler()\n",
    "\n",
    "# 分别对训练和测试数据的特征以及目标值进行标准化处理\n",
    "X_train = ss_X.fit_transform(X_train)\n",
    "X_test = ss_X.transform(X_test)\n",
    "\n",
    "#y_train = ss_y.fit_transform(y_train)\n",
    "#y_test = ss_y.transform(y_test)\n",
    "\n",
    "y_train = ss_y.fit_transform(y_train.reshape(-1, 1))\n",
    "y_test = ss_y.transform(y_test.reshape(-1, 1))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  2.确定模型类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1461\n",
       "1    1462\n",
       "2    1463\n",
       "3    1464\n",
       "4    1465\n",
       "Name: Id, dtype: int64"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dpath = './data/'\n",
    "train = pd.read_csv(dpath +'AmesHouse_FE_train.csv')\n",
    "test = pd.read_csv(dpath +'AmesHouse_FE_test.csv')\n",
    "y_train = train['SalePrice'].values\n",
    "X_train = train.drop('SalePrice',axis = 1)\n",
    "test_id = test['Id']\n",
    "X_test = test.drop('Id',axis = 1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.1 缺省参数的线性回归"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  1.14732561e+03,   4.91596999e+03,   2.00347209e+03,\n",
       "        -1.75364572e+02,  -3.80941699e+02,   9.21603915e+02,\n",
       "         4.31532789e+02,   2.42693610e+10,  -4.04815791e+03,\n",
       "         1.09987480e+04,   2.90664019e+03,   3.46746773e+03,\n",
       "        -5.63098443e+10,  -2.25768222e+03,  -6.79748200e+02,\n",
       "         3.35758012e+02,   4.58855688e+03,   7.02519817e+01,\n",
       "         2.51628014e+14,   1.52835374e+02,   9.44638636e+13,\n",
       "         2.58612184e+14,   2.13594793e+14,   1.01893862e+03,\n",
       "         1.35684461e+14,   1.58544831e+14,   1.80488272e+13,\n",
       "         3.63855516e+14,  -2.58184350e+13,  -5.93255856e+12,\n",
       "        -2.73285011e+13,  -1.25377881e+13,  -5.06131967e+03,\n",
       "        -6.52484327e+03,  -5.77399370e+03,   4.17018294e+03,\n",
       "         3.89381474e+03,   5.25221873e+10,   1.09776887e+02,\n",
       "         4.19216142e+02,  -2.77796201e+10,  -6.69971545e+05,\n",
       "        -2.32172453e+03,   4.99318894e+03,   4.55199374e+02,\n",
       "         1.49835287e+03,  -3.58716464e+14,  -3.35881446e+14,\n",
       "        -1.61139535e+14,  -3.06439559e+14,  -2.24851805e+02,\n",
       "        -1.49891103e+04,   4.30749863e+03,   2.30272505e+02,\n",
       "         1.19819306e+04,  -5.27982172e+03,   2.31664136e+03,\n",
       "         7.12485873e+03,  -5.25221854e+10,   1.53033371e+04,\n",
       "         1.70385810e+04,   3.88280077e+13,  -8.38910112e+14,\n",
       "         1.62124300e+12,   5.75570216e+14,  -3.17025881e+10,\n",
       "         2.05862424e+10,  -2.98239044e+05,   1.62079340e+05,\n",
       "        -5.97464827e+04,   1.53703243e+06,  -5.13390461e+05,\n",
       "         1.01006687e+06,  -1.44571414e+06,   4.73725774e+05,\n",
       "        -1.01542489e+06,  -5.25196366e+10,   3.14405665e+10,\n",
       "        -3.06173697e+09,   1.40784355e+10,  -3.76975927e+09,\n",
       "         2.22375343e+10,   6.92292371e+04,  -3.34962869e+04,\n",
       "         8.96661625e+03,   4.26123359e+05,  -1.40701708e+05,\n",
       "         4.61128310e+05,   1.29296999e+05,  -3.40030712e+04,\n",
       "         1.16080540e+05,   2.94108718e+10,   2.97758120e+10,\n",
       "        -2.87684061e+09,   4.74276238e+05,  -1.73810904e+05,\n",
       "         3.28286957e+05,  -6.32774065e+09,  -6.32773755e+09,\n",
       "        -1.54083047e+10,  -6.32774341e+09,  -6.32773773e+09,\n",
       "        -2.01439342e+10,  -5.72130379e+09,  -5.72130214e+09,\n",
       "        -8.44711049e+09,   2.37207779e+09,   2.37207475e+09,\n",
       "         2.37208605e+09,   2.37207592e+09,   2.37207768e+09,\n",
       "         2.37206563e+09,   2.37208359e+09,   2.37207249e+09,\n",
       "         2.37209415e+09,   1.13511910e+10,   3.73444361e+09,\n",
       "         3.73444269e+09,   3.73445192e+09,   3.73446977e+09,\n",
       "         3.73443657e+09,   3.73445476e+09,   3.73446075e+09,\n",
       "         3.73445250e+09,  -8.39082927e+09,   4.66908238e+09,\n",
       "         4.66908227e+09,   4.66909062e+09,   4.66909313e+09,\n",
       "         4.66908280e+09,   4.66907875e+09,   5.73846068e+09,\n",
       "         5.73844978e+09,   5.73845171e+09,   5.73847470e+09,\n",
       "         9.32512251e+09,   5.73843943e+09,   5.73845486e+09,\n",
       "         5.73845534e+09,   5.73846486e+09,   5.73845514e+09,\n",
       "         5.73850786e+09,   5.73846938e+09,   5.73845526e+09,\n",
       "         5.73845118e+09,   5.73846151e+09,   6.54442076e+09,\n",
       "         3.11481158e+09,   3.11481009e+09,   3.11482396e+09,\n",
       "         3.11480731e+09,  -4.71862502e+08,   3.11484389e+09,\n",
       "         3.11481455e+09,   3.11481631e+09,   3.11481252e+09,\n",
       "         3.11477352e+09,   3.11481238e+09,   3.11479485e+09,\n",
       "         3.11481471e+09,   3.11481949e+09,   3.11482350e+09,\n",
       "         3.11481196e+09,  -1.33332486e+09,  -6.75801740e+09,\n",
       "        -6.75801918e+09,  -6.75801728e+09,  -6.75802402e+09,\n",
       "        -6.75801642e+09,  -6.96933452e+08,   1.00499187e+10,\n",
       "         1.00499185e+10,   1.00499223e+10,   1.00499181e+10,\n",
       "         1.00499198e+10,   1.00498914e+10,   9.53538578e+09,\n",
       "         1.33291001e+10,   1.71769986e+10,   1.33290963e+10,\n",
       "         1.33290978e+10,   3.44904925e+09,   5.81882199e+08,\n",
       "         5.81900777e+08,   5.81908280e+08,   5.81906791e+08,\n",
       "         5.81901608e+08,   5.81902269e+08,   2.23467008e+10,\n",
       "        -1.48577951e+09,  -5.07456529e+08,  -5.07443045e+08,\n",
       "        -5.07451154e+08,  -5.07449266e+08,  -5.07450391e+08,\n",
       "        -5.07435871e+08,  -3.56153231e+09,   6.29369189e+09,\n",
       "         6.29371586e+09,   6.29369184e+09,   6.29370064e+09,\n",
       "         6.29369735e+09,   6.29369829e+09,   6.29369022e+09,\n",
       "         6.29370248e+09,  -2.44755943e+09,  -7.62647222e+09,\n",
       "        -7.62646766e+09,  -7.62647887e+09,  -7.62647597e+09,\n",
       "         5.12189402e+09,   4.41166485e+08,   4.41172252e+08,\n",
       "         4.41161779e+08,   4.41149126e+08,   4.41164659e+08,\n",
       "        -3.08930468e+09,   1.47897304e+09,   9.04961428e+08,\n",
       "         1.47896116e+09,   1.47895822e+09,   1.47898080e+09,\n",
       "         1.47899074e+09,   1.47898094e+09,   1.47898986e+09,\n",
       "         1.47896249e+09,   1.47899333e+09,   1.47899148e+09,\n",
       "         1.47899401e+09,   1.47899296e+09,   1.47897729e+09,\n",
       "         1.47898328e+09,   1.05595435e+10,   1.14772319e+09,\n",
       "         2.95411353e+09,   2.95415734e+09,   2.95414315e+09,\n",
       "         2.95414754e+09,   2.95414068e+09,  -1.63782602e+08,\n",
       "         7.54375853e+09,   7.54377208e+09,  -5.71211979e+10,\n",
       "         7.54377926e+09,   1.82453926e+09,   1.35014415e+09,\n",
       "         1.35027607e+09,   1.35028005e+09,   1.35027320e+09,\n",
       "         1.35020617e+09,  -7.29742169e+08,  -5.93698957e+09,\n",
       "        -5.93699330e+09,  -5.93699088e+09,  -5.93699688e+09,\n",
       "        -5.93698849e+09,  -5.93699031e+09,  -5.93699226e+09,\n",
       "        -5.93699075e+09,  -5.93698931e+09,  -5.93699152e+09,\n",
       "        -5.93699444e+09,  -5.93699023e+09,   0.00000000e+00,\n",
       "        -2.54655397e+09,  -2.54652772e+09,  -2.54653335e+09,\n",
       "        -2.54653630e+09,  -2.54654898e+09,  -2.54655568e+09,\n",
       "        -2.54652888e+09,  -2.54655929e+09,  -2.54655997e+09,\n",
       "        -2.54654496e+09,  -2.54655922e+09,  -2.54655891e+09,\n",
       "        -2.54655508e+09,  -2.54653227e+09,  -2.54655336e+09,\n",
       "        -2.54654134e+09,  -2.54652145e+09,  -2.54655065e+09,\n",
       "        -2.54654835e+09,  -2.54654976e+09,  -2.54655094e+09,\n",
       "        -2.54654768e+09,  -2.54650350e+09,  -2.54655273e+09,\n",
       "        -2.54652690e+09,   0.00000000e+00,  -5.05121822e+09,\n",
       "        -5.05118812e+09,  -5.05121960e+09,  -5.05121585e+09,\n",
       "        -5.05123861e+09,  -5.05121649e+09,  -5.05119609e+09,\n",
       "         0.00000000e+00,   4.75683203e+09,   4.75681703e+09,\n",
       "         4.75682228e+09,   4.75682004e+09,   4.75682430e+09,\n",
       "         4.75686197e+09,   0.00000000e+00,   1.80659526e+10,\n",
       "         1.80659670e+10,   1.80659534e+10,   1.80659499e+10,\n",
       "         1.80659601e+10,  -5.59577654e+10,   0.00000000e+00,\n",
       "        -9.58536047e+08,  -9.58510460e+08,  -9.58518717e+08,\n",
       "        -9.58522119e+08,  -9.58528630e+08,  -9.58533961e+08,\n",
       "        -9.58502758e+08,  -9.58536183e+08,  -9.58536277e+08,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 线性回归\n",
    "#class sklearn.linear_model.LinearRegression(fit_intercept=True, normalize=False, copy_X=True, n_jobs=1)\n",
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "# 使用默认配置初始化\n",
    "lr = LinearRegression()\n",
    "\n",
    "# 训练模型参数\n",
    "lr.fit(X_train, y_train)\n",
    "\n",
    "# 预测，下面计算score会自动调用predict\n",
    "lr_y_predict = lr.predict(X_test)\n",
    "lr_y_predict_train = lr.predict(X_train)\n",
    "\n",
    "#显示特征的回归系数\n",
    "lr.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The value of default measurement of LinearRegression on train is 0.938188038886\n"
     ]
    }
   ],
   "source": [
    "# 使用LinearRegression模型自带的评估模块（r2_score），并输出评估结果\n",
    "\n",
    "#测试集\n",
    "#print 'RMSE on test is ', np.sqrt(mean_squared_error(y_test,lr_y_predict))\n",
    "\n",
    "#训练集\n",
    "print 'The value of default measurement of LinearRegression on train is', lr.score(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAe8AAAFsCAYAAADlrTG7AAAABH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dR+aH4LfJm/PAVuT2Ax8Hj1Pq4qD+Caqv6v2Hyk9pnUBiq1AR8dyH0d\nqL6q5l1a7d9j1I1QpTai8zfVvEvryvenFlRtwG3AqKp8dPW5rZq/f0/bGOov4FvV1305tR/yiduz\n33bEV3f9syO/qq/9f1avRzr3uz+PO90d20p5Ad+hdstzfXWsOmt79E932xjuLx+PKklSYXzCmiRJ\nhTG8JUkqjOEtSVJhDG9JkgpjeEuSVBjDW5KkwhjekiQV5v8D/PHS/bNipr8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x15a6bc88>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#在训练集上观察预测残差的分布，看是否符合模型假设：噪声为0均值的高斯噪声\n",
    "f, ax = plt.subplots(figsize=(7, 5)) \n",
    "f.tight_layout() \n",
    "ax.hist(y_train - lr_y_predict_train,bins=40, label='Residuals Linear', color='b', alpha=.5); \n",
    "ax.set_title(\"Residuals\") \n",
    "ax.legend(loc='best');"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARgAAADQCAYAAADcQn7hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAH09JREFUeJztnX+0XFWV5z/fvFTgJagvUaTDAyRg\nJjSIEMhAMD3TGpUgKDzxB9D2wDAKStM2tD2RZJo1gW5cROMgMt2NsASFblQQ8TU/jZFg9zRLfiS+\nQAwQCRAwDxpC54dAorwke/64p5L7Krdu3Xqpe6te1f6sVavqnnvuPefmJjvn7H3O/srMcBzHyYMx\nze6A4zjtixsYx3Fyww2M4zi54QbGcZzccAPjOE5uuIFxHCc3cjUwknok3S7pKUlPSjpB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       "<matplotlib.figure.Figure at 0x15fc3e80>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#还可以观察预测值与真值的散点图\n",
    "plt.figure(figsize=(4, 3))\n",
    "plt.scatter(y_train, lr_y_predict_train)\n",
    "plt.plot([-3, 3], [-3, 3], '--k')   #数据已经标准化，3倍标准差即可\n",
    "plt.axis('tight')\n",
    "plt.xlabel('True price')\n",
    "plt.ylabel('Predicted price')\n",
    "plt.tight_layout()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.2 正则化的线性回归（L2正则 --> 岭回归）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RidgeCV(alphas=[0.01, 0.1, 1, 10, 20, 40, 80, 100], cv=None,\n",
       "    fit_intercept=True, gcv_mode=None, normalize=False, scoring=None,\n",
       "    store_cv_values=True)"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#岭回归／L2正则\n",
    "#class sklearn.linear_model.RidgeCV(alphas=(0.1, 1.0, 10.0), fit_intercept=True, \n",
    "#                                  normalize=False, scoring=None, cv=None, gcv_mode=None, \n",
    "#                                  store_cv_values=False)\n",
    "from sklearn.linear_model import  RidgeCV\n",
    "\n",
    "alphas = [0.01, 0.1, 1, 10,20, 40, 80,100]\n",
    "reg = RidgeCV(alphas=alphas, store_cv_values=True)   \n",
    "reg.fit(X_train, y_train)       "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAERCAYAAAB4jRxOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vc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54cA3M8sJB76ZWU448G1FkDRwnp+/K72Kt1iZh1VkptFSy8wq3ynp/lLLm50PB77lXjqX\nSnVEPF/uuiOiF+iRdE2567b8ceDbipJeofgJSU8qud/Ae9PlVekl9E9JulfSfZLek37sNym4wlfS\nX6UTtT0l6Y/nqWdA0p9JekzS9yR1Frx9s6R/lPRTSb+Slt8q6e/T8o9JelNB+W+kbTDLlAPfVpp3\nA1cBVwLXA59Ipx14N7AV+CXgd4E3FnzmGmB3weuPR0Q38Grgn0h69Rz1NAOPRcTVwN8Btxe8VxMR\nrwc+UrD8CPD2tPx7gU8VlN8F/MrCf1WzhVnSk6eZnYM3k8waOQEclvR3wOvS5V+LiEngkKTvF3ym\nC+gteP3P0ymra9L3tpNcDl9oEvhK+vxvgMKJsKae7ybpZABqgb+QdBUwAVxaUP4IyRQXZply4NtK\nM9/NSIrdpGSIZI4cJL0C+APgdRFxXNKdU++dReEcJSPp4wSn/4/9O5I5jK4k2bMeLijfkLbBLFMe\n0rGV5hHgvZKq03H1t5BMcvYDkhuEVElaT3Kbuyn7gEvS523AINCXlrtxnnqqSGbLBPgX6fcX0w70\npHsYv01y28Ipl7I0Zku1Fc5b+LbS3EMyPv84yVb3RyPikKSvA9eRBOtPSe401Jd+5lskHcB3I+Jx\nST8mmU3xeeAf5qlnEHiVpN3p97z3LO36NPB1STeTzGY5WPDe29I2mGXKs2VabkhqieQuR2tItvqv\nSTuDRpIQviYd+y/luwYiomWR2vUI8M6IOL4Y32c2H2/hW57cK6kDqAP+c0QcAoiIIUm3k9w79Bfl\nbFA67PRJh72Vg7fwzcxywgdtzcxywoFvZpYTDnwzs5xw4JuZ5YQD38wsJ/4/UrROH0FQ+McAAAAA\nSUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x15904550>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('alpha is:', 10.0)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([  1.44421299e+03,   5.16149865e+03,   2.04616529e+03,\n",
       "        -3.78292916e+02,  -2.81609096e+02,   6.09226940e+02,\n",
       "         1.01628907e+03,  -2.08752514e+02,   3.52369378e+02,\n",
       "         1.06993336e+04,   2.54770968e+03,   4.87104364e+03,\n",
       "        -4.32134249e+02,  -3.47519373e+03,  -6.27225870e+02,\n",
       "         1.59214584e+02,   5.17753428e+03,   4.57087839e+02,\n",
       "         3.97866859e+03,   6.65224688e+02,  -9.25328847e+02,\n",
       "        -4.15961179e+03,  -6.72046168e+02,   8.14597150e+02,\n",
       "         2.53254280e+03,  -1.97313350e+03,  -4.86447056e+02,\n",
       "         1.21046751e+02,  -9.80380332e+02,  -7.00518758e+02,\n",
       "         5.04928655e+02,   1.73637308e+03,  -5.34048441e+03,\n",
       "        -4.83314850e+03,  -1.74053479e+03,   4.31366698e+03,\n",
       "         4.33610625e+03,   1.40938384e+03,  -2.86500581e+02,\n",
       "        -1.01175560e+02,  -2.88497607e+03,  -3.20888862e+03,\n",
       "         4.59338630e+03,   2.74534272e+03,   6.36203406e+02,\n",
       "         1.62521725e+03,   1.36001483e+03,  -4.11778607e+02,\n",
       "         5.62255186e+02,   1.76297751e+03,  -1.07823933e+03,\n",
       "        -9.47217035e+03,   1.00475324e+01,   6.42880981e+02,\n",
       "         6.80671054e+03,  -4.13798173e+03,   4.48997222e+03,\n",
       "         2.92032558e+03,   1.40938384e+03,   6.65030251e+03,\n",
       "         1.11996826e+04,   1.57140861e+02,  -2.85133122e+02,\n",
       "         1.70326647e+02,   1.70335170e+03,  -1.09316425e+03,\n",
       "         1.80682162e+03,   3.81917619e+03,   1.32050186e+04,\n",
       "         3.16036188e+03,   8.98178164e+02,   3.99120485e+03,\n",
       "         1.56614423e+03,  -3.52227966e+02,   3.99181950e+03,\n",
       "         2.51074017e+03,   2.48964779e+02,   5.24989618e+02,\n",
       "        -5.34291884e+02,   5.23013803e+03,   3.99876397e+03,\n",
       "        -3.46628199e+03,   4.91492295e+03,  -5.63056870e+01,\n",
       "        -1.62468654e+03,   7.31984609e+03,  -3.42390252e+03,\n",
       "        -6.02694722e+03,   1.90424917e+03,   1.73165007e+03,\n",
       "        -6.45863359e+02,  -4.32134249e+02,  -4.32134249e+02,\n",
       "        -4.32134249e+02,   3.13132682e+03,  -6.10639208e+03,\n",
       "         1.46598725e+03,   7.31959190e+03,   8.74981904e+02,\n",
       "         7.89470732e+01,  -6.47006634e+03,  -1.80345454e+03,\n",
       "         0.00000000e+00,  -1.87934368e+03,   1.87934368e+03,\n",
       "         0.00000000e+00,  -1.00913142e+02,  -3.02253199e+03,\n",
       "         6.42325269e+03,  -1.05176864e+03,  -1.32249349e+03,\n",
       "        -6.25823143e+03,   2.36915152e+03,  -9.16995984e+02,\n",
       "         3.88053045e+03,   0.00000000e+00,  -2.03718936e+02,\n",
       "        -4.49622233e+02,   1.21194407e+03,   1.48046564e+03,\n",
       "        -1.23222066e+03,  -2.14675133e+03,   1.02435655e+03,\n",
       "         3.15546895e+02,   0.00000000e+00,  -1.56548711e+02,\n",
       "        -1.58098171e+03,   2.02454410e+03,   1.39693314e+03,\n",
       "        -1.95652178e+03,   2.72574959e+02,  -2.99975601e+02,\n",
       "        -2.83043826e+02,  -1.58350994e+03,   9.16630514e+03,\n",
       "        -1.17222179e+03,   2.07690429e+03,  -2.11715204e+03,\n",
       "         6.87418480e+01,   1.91106864e+03,  -2.89208717e+03,\n",
       "        -2.13582862e+02,   3.58189867e+03,  -2.49782413e+03,\n",
       "        -6.52694296e+03,   7.81421736e+02,   0.00000000e+00,\n",
       "        -1.57190015e+03,  -1.97798863e+02,   1.57814490e+03,\n",
       "        -3.16146306e+03,  -1.17222179e+03,   5.95063927e+03,\n",
       "        -1.94259253e+03,   6.82787285e+02,  -7.71061149e+02,\n",
       "        -1.91892217e+03,  -3.65006669e+03,  -1.32158696e+03,\n",
       "         4.05011422e+02,   2.06679968e+03,   5.43710534e+03,\n",
       "        -4.12874525e+02,   0.00000000e+00,   9.26299719e+02,\n",
       "        -9.89944354e+02,   1.46250530e+03,  -2.79472100e+03,\n",
       "         1.39586034e+03,   0.00000000e+00,   1.87573710e+03,\n",
       "        -1.13584115e+03,   3.27287709e+03,   2.30833521e+03,\n",
       "        -7.75670951e+02,  -5.54543730e+03,   0.00000000e+00,\n",
       "         3.16994560e+03,  -2.40585619e+03,  -1.93890896e+03,\n",
       "         1.17481955e+03,   0.00000000e+00,  -8.32691599e+03,\n",
       "         1.81408265e+03,   3.36676651e+02,   7.20754563e+03,\n",
       "        -9.45649055e+02,   2.32011631e+03,  -2.40585619e+03,\n",
       "         0.00000000e+00,  -7.67260907e+02,   3.24955530e+03,\n",
       "        -2.78235884e+03,  -1.27653139e+02,  -1.57607879e+03,\n",
       "         2.00379638e+03,   0.00000000e+00,  -2.63202259e+02,\n",
       "         9.83619761e+02,  -1.42408199e+03,  -4.14286522e+03,\n",
       "         3.44170360e+03,   4.75728878e+03,  -5.09455849e+03,\n",
       "         1.74209582e+03,   0.00000000e+00,   1.19304860e+03,\n",
       "         6.84229863e+03,  -5.89789956e+03,  -2.13744766e+03,\n",
       "         0.00000000e+00,  -6.96009564e+01,   7.55434299e+03,\n",
       "        -3.20018811e+03,  -3.62945126e+03,  -6.55102665e+02,\n",
       "         0.00000000e+00,   1.65588337e+02,   0.00000000e+00,\n",
       "        -6.36093967e+03,  -4.13930701e+03,  -8.34497202e+02,\n",
       "         2.77815687e+03,  -3.47450004e+03,   3.19764136e+03,\n",
       "        -2.11442425e+02,   3.65862326e+03,   3.14150883e+03,\n",
       "         3.83543455e+03,   8.01656007e+01,  -6.27304764e+02,\n",
       "        -1.28807476e+03,   7.89470732e+01,   0.00000000e+00,\n",
       "        -1.18648665e+04,   6.41061212e+03,   3.77107992e+03,\n",
       "         4.09289559e+03,  -2.40972111e+03,   0.00000000e+00,\n",
       "        -7.07765317e+03,  -1.07140014e+03,   5.35933689e+02,\n",
       "         7.61311962e+03,   0.00000000e+00,  -1.13395256e+03,\n",
       "         1.84518086e+03,   1.00531416e+03,   2.16354844e+03,\n",
       "        -3.88009090e+03,   0.00000000e+00,   1.32511817e+03,\n",
       "        -1.87775555e+03,  -1.89886028e+02,  -3.64377664e+03,\n",
       "         2.86708517e+03,   2.37712905e+03,  -1.02642229e+03,\n",
       "        -2.89685796e+02,   2.83815727e+03,  -6.16394215e+02,\n",
       "        -2.18490072e+03,   4.21331577e+02,   0.00000000e+00,\n",
       "        -6.54700518e+03,   2.03855332e+03,   2.92166238e+03,\n",
       "         6.55451381e+03,  -2.89793442e+03,  -8.02873087e+03,\n",
       "         1.42964696e+04,  -8.55632186e+03,  -9.09841902e+03,\n",
       "        -7.48676472e+02,  -1.12999054e+04,  -1.06024997e+04,\n",
       "        -7.23915855e+03,   6.71159421e+03,  -6.82092223e+03,\n",
       "         1.89923128e+03,   2.12540325e+04,  -2.16159722e+03,\n",
       "        -2.38642435e+03,  -3.03002262e+03,  -4.65832529e+03,\n",
       "         2.45657694e+03,   2.47833480e+04,  -6.25666425e+03,\n",
       "         7.41662548e+03,   0.00000000e+00,  -3.68463897e+03,\n",
       "         3.42735531e+03,   5.28466904e+02,  -6.94527587e+02,\n",
       "        -6.11114833e+03,  -1.73541861e+03,   8.26991128e+03,\n",
       "         0.00000000e+00,  -3.55671605e+02,  -2.71072924e+03,\n",
       "         1.50349868e+03,   1.88284103e+03,  -1.22661664e+03,\n",
       "         9.06677771e+02,   0.00000000e+00,  -3.78398840e+03,\n",
       "         3.66509828e+03,  -2.26461887e+03,  -2.96315656e+03,\n",
       "         4.84418236e+03,   5.02483187e+02,   0.00000000e+00,\n",
       "        -5.93534211e+03,   5.31564768e+03,   2.52523532e+03,\n",
       "         1.49220439e+03,  -2.85821878e+02,  -1.71957220e+03,\n",
       "         6.86138314e+03,  -9.25158089e+02,  -7.32857625e+03,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00])"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mse_mean = np.mean(reg.cv_values_, axis = 0)\n",
    "plt.plot(np.log10(alphas), mse_mean.reshape(len(alphas),1)) \n",
    "plt.plot(np.log10(reg.alpha_)*np.ones(3), [0.28, 0.29, 0.30])\n",
    "plt.xlabel('log(alpha)')\n",
    "plt.ylabel('mse')\n",
    "plt.show()\n",
    "\n",
    "print ('alpha is:', reg.alpha_)\n",
    "reg.coef_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The value of default measurement of RidgeRegression is -213716.619076\n"
     ]
    }
   ],
   "source": [
    "# 使用LinearRegression模型自带的评估模块（r2_score），并输出评估结果\n",
    "print 'The value of default measurement of RidgeRegression is', reg.score(X_test, y_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.3 正则化的线性回归（L1正则 --> Lasso）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LassoCV(alphas=[0.01, 0.1, 1, 10, 100], copy_X=True, cv=None, eps=0.001,\n",
       "    fit_intercept=True, max_iter=1000, n_alphas=100, n_jobs=1,\n",
       "    normalize=False, positive=False, precompute='auto', random_state=None,\n",
       "    selection='cyclic', tol=0.0001, verbose=False)"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#### Lasso／L1正则\n",
    "# class sklearn.linear_model.LassoCV(eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, \n",
    "#                                    normalize=False, precompute=’auto’, max_iter=1000, \n",
    "#                                    tol=0.0001, copy_X=True, cv=None, verbose=False, n_jobs=1,\n",
    "#                                    positive=False, random_state=None, selection=’cyclic’)\n",
    "from sklearn.linear_model import LassoCV\n",
    "\n",
    "alphas = [0.01, 0.1, 1, 10,100]\n",
    "\n",
    "lasso = LassoCV(alphas=alphas)   \n",
    "lasso.fit(X_train, y_train)       "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAERCAYAAABowZDXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xl8XXWd//HXu0nTJV3SJW3pTlla\nKNA2DaWAIgzKgDOKG0NLmVEG6FRFZWZ0xHF++BNnfo7D6AgKOC0qKqUICIoLiIoKKi0mXWhZytLS\nhUIb2nRf0qaf3x/3pFxC2t60OfcmN+/n43Efufec77n3k5M273zP95zvUURgZmZ2OF0KXYCZmXUM\nDgwzM8uJA8PMzHLiwDAzs5w4MMzMLCcODDMzy0nRBYak70jaIGlZDm1HSvqtpEWSnpL07nzUaGbW\nERVdYAB3ABfm2PbfgHsiYhIwDbg1raLMzDq6oguMiHgM2JS9TNJxkh6WVCvpcUnjmpoDfZLnfYF1\neSzVzKxDKS10AXkyG5gVES9IOoNMT+IvgP8LPCLpE0A58M7ClWhm1r4VfWBI6gWcBdwrqWlxt+Tr\ndOCOiPiqpDOBH0g6JSL2F6BUM7N2regDg8xht80RMbGFdVeSjHdExBOSugMDgQ15rM/MrEMoujGM\n5iJiK7BS0iUAypiQrF4NnJ8sPwnoDtQVpFAzs3ZOxTZbraR5wLlkegrrgS8AjwK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A8PMzHLiwDAzs5w4MMzMLCcODDMzy4kDwwyQtP0ot78vuYr8UG1+p0PM9Jtr\nm2btKyU9nGt7s6PhwDA7SslcQiURsSLfnx0RdcCrks7O92db5+PAMMuSXCF7o6Rlytxv5NJkeZdk\nCoinJf1M0i8kfSjZbAZZV5hLui2Z6PBpSV88yOdsl/RVSQsl/UZSZdbqSyQ9Kel5SW9P2o+W9HjS\nfqGks7La/zipwSxVDgyzN/sAMBGYALwTuDGZNuMDwGjgVOAq4Mysbc4GarNefz4iqoHTgHdIOq2F\nzykHFkZEFfB74AtZ60ojYgpwbdbyDcC7kvaXAjdnta8B3t76b9WsdYp68kGzI/A2MrO2NgLrJf0e\nOD1Zfm9E7Adek/TbrG2OAeqyXv9NMuV8abLuZDLTOWTbD/wweX4nkD2RXNPzWjIhBdAV+KakiUAj\ncGJW+w1kpmgxS5UDw+zNDnYzo0Pd5GgXmTmikHQs8Gng9Iiol3RH07rDyJ6jZ0/ytZE3/o/+I5k5\nvCaQOTKwO6t996QGs1T5kJTZmz0GXCqpJBlXOIfMJIF/IHODoS6SBpO5TWeTZ4Hjk+d9gB3AlqTd\nRQf5nC5kZqsFuCx5/0PpC7ya9HD+lsxtV5ucSPuYrdiKnHsYZm/2AJnxiSVk/ur/l4h4TdKPgPPJ\n/GJ+nsydzrYk2/ycTID8OiKWSFpEZjbTFcAfD/I5O4DxkmqT97n0MHXdCvxI0iVkZpPdkbXuvKQG\ns1R5tlqzHEnqFZm7rA0g0+s4OwmTHmR+iZ+djH3k8l7bI6JXG9X1GHBxRNS3xfuZHYx7GGa5+5mk\nCqAM+FJEvAYQEbskfYHMvZNX57Og5LDZ1xwWlg/uYZiZWU486G1mZjlxYJiZWU4cGGZmlhMHhpmZ\n5cSBYWZmOfn/zm5xiX/wVFsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xf370a90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('alpha is:', 100.0)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([  1.66320167e+03,   4.74585742e+03,   1.86281575e+03,\n",
       "        -2.45036541e+02,  -4.20438004e+02,   4.73415053e+02,\n",
       "         8.67158593e+02,  -0.00000000e+00,   1.65052154e+02,\n",
       "         1.02924153e+04,   2.50481624e+03,   4.91337502e+03,\n",
       "         0.00000000e+00,  -2.49089941e+03,  -6.73113477e+02,\n",
       "        -4.71076602e+01,   4.96369852e+03,   0.00000000e+00,\n",
       "         6.21910240e+03,   1.38159239e+02,   0.00000000e+00,\n",
       "        -1.75679937e+03,   0.00000000e+00,   6.79717549e+02,\n",
       "         0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,  -7.56758291e+01,  -4.87941248e+02,\n",
       "         5.28648456e+02,   1.75586396e+03,  -5.00764225e+03,\n",
       "        -3.99471610e+03,   0.00000000e+00,   4.56402961e+03,\n",
       "         4.59039753e+03,   2.03941355e+03,   0.00000000e+00,\n",
       "        -0.00000000e+00,  -0.00000000e+00,  -0.00000000e+00,\n",
       "         2.70484968e+03,  -4.53024868e+02,   4.34073396e+02,\n",
       "         1.78822337e+03,   1.83918387e+03,  -0.00000000e+00,\n",
       "         5.21070327e+02,   2.09369374e+03,  -0.00000000e+00,\n",
       "        -5.15140781e+03,  -2.21622310e+01,   6.29860553e+02,\n",
       "         7.42298675e+03,  -9.63156785e+01,   2.97306601e+03,\n",
       "         1.04566063e+03,   7.71189451e+02,   2.48450236e+03,\n",
       "         5.46300830e+03,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   8.29747185e+02,  -2.06602474e+03,\n",
       "         5.20249249e+03,   0.00000000e+00,   2.08626843e+04,\n",
       "         0.00000000e+00,   0.00000000e+00,   4.46433678e+03,\n",
       "         5.29239057e+03,   0.00000000e+00,   0.00000000e+00,\n",
       "         2.83010255e+03,   0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,   6.25847621e+03,\n",
       "        -2.57611798e+03,   0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,   1.33369300e+03,   0.00000000e+00,\n",
       "        -6.63240777e+02,   0.00000000e+00,   2.32580096e+03,\n",
       "        -0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,  -3.22993400e+03,\n",
       "         4.33177026e+03,   1.16431444e+04,   0.00000000e+00,\n",
       "         0.00000000e+00,  -2.90128409e+03,  -0.00000000e+00,\n",
       "         0.00000000e+00,  -9.43338612e+02,   1.31096105e-12,\n",
       "         0.00000000e+00,   0.00000000e+00,  -4.77732990e+02,\n",
       "         6.50540490e+03,  -0.00000000e+00,  -0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,  -0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,  -0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "        -5.63850182e+02,   0.00000000e+00,  -0.00000000e+00,\n",
       "        -0.00000000e+00,  -0.00000000e+00,   9.18093578e+03,\n",
       "        -0.00000000e+00,   0.00000000e+00,  -4.98813609e+02,\n",
       "         0.00000000e+00,   8.33469036e+02,  -0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "        -2.97275262e+03,   0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,  -0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,  -0.00000000e+00,   4.85332184e+03,\n",
       "        -2.30889902e+03,   0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,  -3.22223838e+03,  -0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   2.36759436e+03,\n",
       "        -0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "         2.13556762e+02,   0.00000000e+00,   0.00000000e+00,\n",
       "        -2.28255503e+03,   1.50299350e+03,   0.00000000e+00,\n",
       "        -0.00000000e+00,  -0.00000000e+00,   0.00000000e+00,\n",
       "         1.62974449e+03,  -0.00000000e+00,  -3.14879897e+03,\n",
       "         0.00000000e+00,   0.00000000e+00,  -1.12545836e+03,\n",
       "         0.00000000e+00,  -0.00000000e+00,   3.13991799e+03,\n",
       "        -0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,  -0.00000000e+00,   1.76137916e+03,\n",
       "        -0.00000000e+00,  -0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,  -0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,   2.12499504e+03,  -2.90314090e+03,\n",
       "        -0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         6.38423359e+03,  -3.88624233e+02,  -0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   7.58793857e+03,\n",
       "        -0.00000000e+00,  -0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,  -0.00000000e+00,   0.00000000e+00,\n",
       "        -2.03771758e+03,  -0.00000000e+00,   0.00000000e+00,\n",
       "         5.10681480e+01,  -1.99344018e+03,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,  -0.00000000e+00,  -0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "        -1.23265642e+04,   3.59180298e+02,   0.00000000e+00,\n",
       "         0.00000000e+00,  -3.38292559e+03,   0.00000000e+00,\n",
       "        -3.97540035e+02,  -0.00000000e+00,   0.00000000e+00,\n",
       "         7.59399057e+03,   0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,   5.18582430e+02,\n",
       "        -1.97649624e+02,   0.00000000e+00,  -1.65071393e+02,\n",
       "         1.16961693e+03,   2.47489661e+03,  -0.00000000e+00,\n",
       "        -0.00000000e+00,   2.43713941e+03,  -0.00000000e+00,\n",
       "        -5.12092299e+01,   0.00000000e+00,   0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         8.49249096e+03,  -0.00000000e+00,  -1.49727782e+03,\n",
       "         2.03075597e+04,  -2.06233510e+03,  -1.79561150e+03,\n",
       "        -0.00000000e+00,  -5.98013899e+03,  -5.04982290e+03,\n",
       "        -1.97455085e+03,   0.00000000e+00,  -1.43907189e+03,\n",
       "         3.03033511e+03,   2.94878365e+04,  -0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "         8.23195741e+03,   3.58382388e+04,  -0.00000000e+00,\n",
       "         5.27760884e+03,   0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "        -0.00000000e+00,  -0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,  -0.00000000e+00,  -1.53524806e+03,\n",
       "         0.00000000e+00,   2.06071711e+03,  -0.00000000e+00,\n",
       "        -0.00000000e+00,   0.00000000e+00,  -2.34636980e+03,\n",
       "         0.00000000e+00,  -0.00000000e+00,  -0.00000000e+00,\n",
       "         5.83767940e+03,   0.00000000e+00,   0.00000000e+00,\n",
       "        -1.02783193e+03,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,  -0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,  -3.92395380e+03,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00,   0.00000000e+00,   0.00000000e+00,\n",
       "         0.00000000e+00])"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mses = np.mean(lasso.mse_path_, axis = 1)\n",
    "plt.plot(np.log10(lasso.alphas_), mses) \n",
    "#plt.plot(np.log10(lasso.alphas_)*np.ones(3), [0.3, 0.4, 1.0])\n",
    "plt.xlabel('log(alpha)')\n",
    "plt.ylabel('mse')\n",
    "plt.show()    \n",
    "            \n",
    "print ('alpha is:', lasso.alpha_)\n",
    "lasso.coef_  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The value of default measurement of Lasso Regression on test is -214991.621165\n",
      "The value of default measurement of Lasso Regression on train is 0.922191351052\n"
     ]
    }
   ],
   "source": [
    "# 使用LinearRegression模型自带的评估模块（r2_score），并输出评估结果\n",
    "print 'The value of default measurement of Lasso Regression on test is', lasso.score(X_test, y_test)\n",
    "print 'The value of default measurement of Lasso Regression on train is', lasso.score(X_train, y_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 结果输出"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_test_result = lasso.predict(X_test)\n",
    "y = pd.Series(data = y_test_result,name = 'SalePrice')\n",
    "df = pd.concat([test_id,y],axis = 1)\n",
    "df.to_csv('Result_Ames_House.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
